package ModelLayer;

/**
 * Write a description of class Order here.
 * 
 * klassen order beskriver en ordre der er blevet bestilt
 * @author (dmab0913 Gruppe4) 
 * @version (1.0)
 */
public class Order
{
    private long orderNumber;
    private int date;
    private int deliveryDate;
    private int paymentDeadline;
    private String status;

    /**
     * Constructor for objects of class Order
     */
    public Order(long orderNumber, int date, int deliveryDate, int paymentDeadline, String status)
    {
        // initialise instance variables
        this.orderNumber = orderNumber;
        this.date = date;
        this.deliveryDate = deliveryDate;
        this.paymentDeadline = paymentDeadline;
        this.status = status;
    }

    /**
     * return orderNumber
     */
    public long getOrderNumber()
    {
        return orderNumber;
    }

    /**
     * return date
     */
    public int getDate()
    {
        return date;
    }

    /**
     * return deliveryDate
     */
    public int getDeliveryDate()
    {
        return deliveryDate;
    }

    /**
     * return paymentDeadline
     */
    public int getPaymentDeadline()
    {
        return paymentDeadline;
    }

    /**
     * return status
     */
    public String getStatus()
    {
        return status;
    }

    /**
     * mutator method to set a orderNumber
     */
    public void setOrderNumber(long orderNumber)
    {
        this.orderNumber = orderNumber;
    }

    /**
     * mutator method to set a date
     */
    public void setDate(int date)
    {
        this.date = date;
    }

    /**
     * mutator method to set a deliveryDate
     */
    public void setDeliveryDate(int deliveryDate)
    {
        this.deliveryDate = deliveryDate;
    }

    /**
     * mutator method to set a paymentDeadline
     */
    public void setPaymentDeadline(int paymentDeadline)
    {
        this.paymentDeadline = paymentDeadline;
    }

    /**
     * mutator method to set a status
     */
    public void setStatus(String status)
    {
        this.status = status;
    }

    /**
     * mutator method to set all fields except for orderNumber
     */
    public void updateOrder(int date , int deliveryDate, int paymentDeadline, String status)
    {
        this.date = date;
        this.deliveryDate = deliveryDate;
        this.paymentDeadline = paymentDeadline;
        this.status = status;
    }
}
